@echo off
set port=8080
set jarFile=C:\boot-projects\demo02\target\demo02.jar
for /f "tokens=1-5" %%i in ('netstat -ano^|findstr ":%port%"') do (
	taskkill /pid %%m -t -f
	goto start
)
:start
if exist "%jarFile%" (
	start java -Dfile.encoding=utf-8  -jar "%jarFile%"
) else (
	echo "file not exist:%jarFile%"
)
pause